import { get } from "../utils/requests";

const downloadURL = {
  filesURL: "/filedownload/files",
  citiesURL: "/filedownload/cities",
  typesURL: "/filedownload/types",
};

/**
 * 搜索的文件结果
 * @param {page, pageSize} searchInfo 
 * @returns {status:string, msg:string, total: number, result:array}
 */
export function getFiles(searchInfo) {
  return get(downloadURL.filesURL, searchInfo);
}

/**
 * 搜索框的城市名下拉框内容 
 * @returns {status:string, msg:string, result:array}
 */
export function getCities() {
  return get(downloadURL.citiesURL);
}

/**
 * 搜索框的大类下拉框内容
 * @returns {status:string, msg:string, result:array}
 */
export function getTypes() {
  return get(downloadURL.typesURL);
}
